#pragma once
#include "Nervus.h"
#include "TrainingCaseDB.h"

class CeBrain
{
public:
	CeBrain(void);
	~CeBrain(void);

	void BuildNervusNet( int nIdx, OutputAntennaRate* tryRate, int nRateCount );
	void ClearNervusNet( int nIdx );
	float RunAllTrainingCase( OutputAntennaRate* tryRate, int nRateCount );
	bool RunTrainingCase( int nIdx );
	void ChangeNervusConnection( void );
	void BuildNervusNet2( int nIdx, OutputAntennaRate* tryRate1, OutputAntennaRate* tryRate2, OutputAntennaRate* tryRate3, OutputAntennaRate* tryRate4, int nRateCount );
	float RunAllTrainingCase2( OutputAntennaRate* pRate1, OutputAntennaRate* pRate2, OutputAntennaRate* pRate3, OutputAntennaRate* pRate4, int nRateCount, OutputAntennaRate* pTryRate, int nTryRateCount );

	void DisplayNervusMap( void );
	void SetNervusRates( int nIdx, OutputAntennaRate* pRate, int nRateCount );

private:
	CNervusNet *m_pNervusNet[MAX_CASE2];
	CNervusAntenna m_pinInput[ INPUT_SIGNAL_COUNT ];
	CNervusAntenna m_pinOutput[ OUTPUT_SIGNAL_COUNT ];
	CTrainingCaseDB *m_pTrainingCaseDB;
	//int m_nOutputSignal[ OUTPUT_SIGNAL_COUNT ];
	int m_nNervusValuesCount;
};

